Method and system for resource scheduling

ABSTRACT

An apparatus and method for resource scheduling on an application system utilizing a proxy server, the application system including one or more hosts and running one or more applications, each of the one or more applications having one or more instances. The method includes monitoring a request queue of application requests, at the proxy server, to be processed by the application system for the one or more applications, and scheduling computing resources of the application system for an application of the one or more applications according to a predetermined scheduling rule and a status of the request queue.

CROSS-REFERENCE TO RELATED APPLICATIONS

This application claims the benefit of priority from Chinese PatentApplication No. 201510494855.9, filed on Aug. 13, 2015, entitled “Methodand System for Resource Distribution,” which is incorporated herein byreference in its entirety.

BACKGROUND Field of the Disclosure

The present disclosure relates to the art of computer applicationsrunning on systems such as servers, and in particular, to a method and asystem for resource scheduling.

Description of Related Art

A common problem in the operation of an application system is anoccasional occurrence of a high number of hits, or requests. In order toensure that the application system can operate normally, a server isgenerally built in accordance with a highest expected demand. However,in this case, the result will be a large amount of idle resources undernormal operating conditions. If a peak number of hits is underestimatedduring the system construction period, the application system willbecome slow, or crash when a large number of concurrent requests arise.Accordingly, a flexible scheduling mechanism has been proposed toaddress the problem mentioned above, that is, when there is a highnumber of hits, computing resources will be created automatically toexpand the processing capacity of the system, and when there is a lownumber of hits and the system is idle, computing resources will bereduced automatically to save costs.

A conventional flexible scheduling mechanism determines the load ofapplications based primarily on a utilization of system resources, forexample, on the utilization of resources such as CPU, memory, networkflow, magnetic disk IO, and the like. If utilization of the CPU ormemory by an application is high, then it is determined that anexpansion is required for the application. However, in certain cases,this approach fails to reflect the true status of utilization. Forexample, the system resources utilized by some applications may not bemuch, but the processing of such applications is extremely slow or evensuspended. For such applications, the use of the current flexiblescheduling mechanism is not able to satisfy the requirement forexpansion.

BRIEF SUMMARY

According to some embodiments, the present disclosure provides methodsand systems for resource scheduling which more accurately determine andsatisfy the actual needs of scheduling.

According to some embodiments, the present disclosure provides a methodfor resource scheduling including monitoring a blocking status ofapplication requests to be processed by a server and schedulingcomputing resources of the server for the application according to apredetermined scheduling rule and the blocking status of the applicationrequests.

According to some embodiments of the present disclosure, the monitoringof a blocking status of application requests to be processed by a serverincludes collecting the number of requests in a queue of blockedrequests in the server, the queue of blocked requests comprising theapplication requests to be processed by the server, and performinganalyses and statistical analyses on the number of requests collected toobtain the blocking status of the application requests.

According to some embodiments of the present disclosure, the blockingstatus of the application requests includes at least one of a blockingstatus of requests with respect to a particular application, a blockingstatus of requests with respect to a particular instance, and a blockingstatus of requests with respect to a particular host.

According to some embodiments of the present disclosure, the collectingthe number of requests in a queue of blocked requests in the serverincludes collecting the number of requests in the queue of blockedrequests in the server from an exposed API of a proxy server.

According to some embodiments of the present disclosure, the methodfurther includes providing an event monitoring and statistics module inthe proxy server, wherein the event monitoring and statistics modulemonitors to the events of the proxy server submitting requests to theserver to acquire a number of submitted requests; monitors to the eventsof the proxy server confirming that the server has completed processingof requests to acquire a number of processed requests, and determines anumber of requests in the queue of blocked requests in the serveraccording to the number of the submitted requests and the number of theprocessed requests.

According to some embodiments of the present disclosure, the collectingthe number of requests in the queue of blocked requests in the serverfrom an exposed API of a proxy server includes accessing the URLprovided by the API, and acquiring, from the page data corresponding tothe URL, the number of requests in the queue of blocked requests in theserver.

According to some embodiments of the present disclosure, the schedulingthe computing resources of the server for the application according to apredetermined scheduling rule and the blocking status of the applicationrequests includes at least one of the following: if the blocking statusof requests with respect to a particular application satisfies a firstexpansion condition, generating and deploying new instances for theparticular application; if the blocking status of requests with respectto a particular application satisfies a first contraction condition,reducing instances for the particular application; if the blockingstatus of requests with respect to a particular instance satisfies asecond expansion condition, increasing the system resources for theparticular instance, or using other instances to share the load of theparticular instance; if the blocking status of requests with respect toa particular instance satisfies a second contraction condition, reducingthe system resources for the particular instance; if the blocking statusof requests with respect to a particular host satisfies a thirdexpansion condition, using other hosts to share the load of theparticular host; and if the blocking status of requests with respect toa particular host satisfies a third contraction condition,preferentially deploying instances on the particular host, orpreferentially using the particular host to share the load of otherhosts.

According some embodiments of the present disclosure, the method furtherincludes at least one of the following: monitoring the resourceutilization by the instances in the particular application, if theaverage resource utilization by the instances in a particularapplication is greater than or equal to a predetermined first upperlimit value, increasing instances for the particular application; if theaverage resource utilization by the instances in a particularapplication is less than or equal to a predetermined first lower limitvalue, reducing instances for the particular application; monitoring theresource utilization by the instances in the particular application, ifthe resource utilization by an instance is greater than or equal to apredetermined second upper limit value, increasing the system resourcesutilized by the instance; if the resource utilization by an instance isless than or equal to a predetermined second lower limit value, reducingthe system resources utilized by the instance; if a host is detected asunavailable, initiating a migration of the instances on the host; if aprocess is detected as unavailable, restarting the process, and ifunsuccessful, initiating a migration of the instances on the process;and if an application exception is detected, restarting the application,or initiating a migration of the instances for the application, orgenerating an alert.

The present disclosure also provides a system for resource scheduling,including a block monitoring unit for monitoring a blocking status ofapplication requests to be processed by a server; and a scheduling unitfor scheduling computing resources of the server for the applicationaccording to a predetermined scheduling rule and the blocking status ofthe application requests.

In particular, according to some embodiments of the present disclosure,the block monitoring unit includes a monitoring subunit for collectingthe number of requests in a queue of blocked requests in the server, thequeue of blocked requests comprising the application requests to beprocessed by the server, and a computing subunit for performing analysesand statistical analyses on the number of requests collected by themonitoring subunit to obtain the blocking status of the applicationrequests.

According to some embodiments of the present disclosure, the blockingstatus of the application requests includes at least one of thefollowing: a blocking status of requests with respect to a particularapplication, a blocking status of requests with respect to a particularinstance, and a blocking status of requests with respect to a particularhost.

According to a preferred embodiment of the present disclosure, themonitoring subunit collects the number of requests in the queue ofblocked requests in the server from an exposed API of a proxy server.

According to some embodiments of the present disclosure, the systemfurther includes an event monitoring and statistics module provided inthe proxy server configured to monitor to the events of the proxy serversubmitting requests to the server to acquire a number of submittedrequests, monitor to the events of the proxy server confirming that theserver has completed processing of requests to acquire a number ofprocessed requests, and determine the number of requests in the queue ofblocked requests in the server according to the number of the submittedrequests and the number of the processed requests.

In particular, according to some embodiments of the present disclosure,the monitoring subunit is for accessing the URL provided by the API, andacquiring, from the page data corresponding to the URL, the number ofrequests in the queue of blocked requests in the server.

In particular, according to some embodiments of the present disclosure,the scheduling unit performs at least one of the following schedulings:if the blocking status of requests with respect to a particularapplication satisfies a first expansion condition, generating anddeploying new instances for the particular application; if the blockingstatus of requests with respect to a particular application satisfies afirst contraction condition, reducing instances for the particularapplication; if the blocking status of requests with respect to aparticular instance satisfies a second expansion condition, increasingthe system resources for the particular instance, or using otherinstances to share the load of the particular instance; if the blockingstatus of requests with respect to a particular instance satisfies asecond contraction condition, reducing the system resources for theparticular instance; if the blocking status of requests with respect toa particular host satisfies a third expansion condition, using otherhosts to share the load of the particular host; and if the blockingstatus of requests with respect to a particular host satisfies a thirdcontraction condition, preferentially deploying instances on theparticular host, or preferentially using the particular host to sharethe load of other hosts.

According to some embodiments of the present disclosure, the blockmonitoring unit is further used for monitoring resource utilization bythe instances in a particular application, and the scheduling unit isfurther configured for: increasing instances for the particularapplication if the average resource utilization by the instances in aparticular application is greater than or equal to a predetermined firstupper limit value, and reducing instances for the particular applicationif the average resource utilization by the instances in a particularapplication is less than or equal to a predetermined first lower limitvalue, or, increasing the system resources utilized by the instance ifthe resource utilization by an instance is greater than or equal to apredetermined second upper limit value, and reducing the systemresources utilized by the instance if the resource utilization by aninstance is less than or equal to a predetermined second lower limitvalue.

According to some embodiments some embodiments of the presentdisclosure, the system further includes a status detecting unit fordetecting an operating status of a host, a process or an application;and the scheduling unit is further used for: initiating a migration ofthe instances on the host if a host is detected by the status detectingunit as unavailable; restarting a process if the process is detected bythe status detecting unit as unavailable, and if unsuccessful,initiating a migration of the instances on the process; and restartingthe application, or initiating a migration of the instances for theapplication, or generating an alert if an application exception isdetected by the status detecting unit.

According to some embodiments of the present disclosure, the schedulingunit includes a scheduling subunit for generating a scheduling commandbased on a predetermined scheduling rule and the blocking status of theapplication requests, and sending the scheduling command to a managingsubunit; and a managing subunit for performing, according to thescheduling command, scheduling of the computing resources of the serverfor the application.

As is evident from the descriptions and depictions herein, the presentdisclosure has adopted an approach whereby the blocking status of theapplication requests to be processed by a server is collected, and basedon this, the computing resources of the server for the application arescheduled, instead of being based on utilization of the system resourcesby the application. Since the blocking status of application requests tobe processed by the server can more truly reflect the load of theapplication, the way of scheduling according to the present disclosurecan more accurately satisfy the actual needs of scheduling and improvethe operation of computing resources and the overall system of which theprocessors are a part.

BRIEF DESCRIPTION OF THE DRAWINGS

The accompanying drawings described herein are intended, when takentogether with the following detailed description, to provide furtherunderstanding of the present disclosure. The exemplary embodiments ofthe present disclosure and the description thereof are intended forfurther explaining and clarifying the present disclosure; the scope ofthe present disclosure is not defined by the description or theaccompanying drawings of any specific embodiments, but rather by theclaims. The present disclosure includes the following accompanyingdrawings.

FIG. 1 is a non-limiting block diagram of an architecture according tosome embodiments of the present disclosure.

FIG. 2 is a schematic flow diagram of a method according to someembodiments of the present disclosure.

FIG. 3 is a schematic flow diagram of a method according to someembodiments of the present disclosure.

FIG. 4 is a block diagram of a system for resource scheduling accordingto some embodiments of the present disclosure.

DETAILED DESCRIPTION

In order to make the objectives, technical solutions, and advantages ofthe present disclosure more clear, the present disclosure will bedescribed below in detail with reference to the accompanying drawingsand the particular embodiments.

To facilitate understanding of the present disclosure, first, thearchitecture on which the present disclosure is based upon will bediscussed. As shown in FIG. 1, in the architecture, the server 102 is anetwork device for specifically processing application requests, thatis, the access object of application requests is the server 102, whichis responsible for processing each application request to realize theservice content of the application. Additionally, the server 102 forprocessing application requests may be a single server, or a cluster ofservers including multiple machines.

In the server 102, at least one host may exist, with each host havingone or more application instances running thereon. That is, anapplication can be comprised of more than one application instance, witheach application instance being deployed on a host. The applicationinstances may be deployed on the same host, or on different hosts, oreven on different servers of a cluster of servers.

In the architecture shown in FIG. 1, the proxy server 104 is responsiblefor forwarding the application requests from user-side devices to theserver for processing, and forwarding the responses from the server tothe user-side devices.

The scheduling system 100 is the core of the present disclosure, whichis responsible for monitoring the blocking status of the applicationrequests to be processed by the server 102, and performing scheduling ofthe computing resources of the server for the applications according toa predetermined scheduling rule and the blocking status of theapplication requests. More particularly, when monitoring the blockingstatus of the application requests to be processed by the server 102,the scheduling system does not acquire the blocking status directly fromthe server, but instead indirectly obtains the blocking status of theapplication requests to be processed by the server 102 by collectingdata from the proxy server 104 and then analyzing the same. Theprocessing steps and the components of the scheduling system will bedescribed below in detail.

FIG. 2 is a schematic flow diagram of a method according to someembodiments of the present disclosure.

According to some embodiments, the present disclosure provides a methodfor resource scheduling. Step 200 is monitoring a request queue ofapplication requests, at the proxy server, to be processed by theapplication system for the one or more applications. Step 203 isscheduling computing resources of the application system for anapplication of the one or more applications according to a predeterminedscheduling rule and a status of the request queue.

FIG. 3 is a schematic flow diagram of the method according to someembodiments of the present disclosure, which can be performed by thescheduling system described above, for example. As shown in FIG. 3, themethod includes the following steps.

Step 201 is collecting the number of requests in a queue of blockedrequests in the server from an exposed API (Application ProgrammingInterface) of the proxy server.

Since the proxy server is responsible for forwarding the applicationrequests to the server and receiving responses returned from the serverafter the server processes the application requests, the number of therequests sent to the server to be processed by the server can be knownby the number of the application requests that have been forwarded bythe proxy server to the server and the number of the requests thatcorrespond to the responses received by the proxy server from theserver. Based on this process, the collection of the number of requestsin the queue of blocked requests in the server can be obtained via theproxy server.

More particularly, since the proxy server follows an asynchronous eventprocessing mechanism, a corresponding event will be present whenprocessing is performed. Therefore, an event monitoring and statisticsmodule can be provided in the proxy server in advance, the eventmonitoring and statistics module being responsible for the proxyserver's monitoring of events and statistics of requests. That is, theevent monitoring and statistics module monitors to the events of theproxy server representing requests to the server, to acquire the numberof the requests that have been submitted. Here, a global variable can beused to represent the number of the requests that have been submitted,with the value of 1 being added to the global variable (assuming forexample the variable is identified as u) for each request having beensubmitted. Additionally, the event monitoring and statistics modulemonitors to the events of that the proxy server confirming that theserver has completed processing of requests (for example, receivesresponses returned from the server after the server processes theapplication requests), to acquire the number of the processed requests.For each response received that a request has been processed, the valueof 1 will be subtracted from the global variable u mentioned above. Thefinal value of the global variable may be considered as the number ofrequests in the queue of blocked requests in the server, i.e., thenumber of requests that have been sent to the server to be processed bythe server.

In some embodiments, the event monitoring and statistics module can alsomonitor to the events that the proxy server establishes networkconnections for, but which have not yet been forwarded to the server, inorder to acquire the number of requests for which network connectionshave been established. The number of requests indicates the processingload that the server will face, and can serve as an assisting factorwhich the scheduling unit can use as a reference in subsequentscheduling of computing resources.

The number of requests acquired as above can be output by the eventmonitoring and statistics module through an exposed API of the proxyserver, wherein the HTTP protocol, for example, may be employed foroutput. For example, the API can provide a particular URL, and when thescheduling system accesses the URL, the API will return a page which canprovide the number of requests described above in the form of formatteddata, that is, the scheduling system acquires, from the page datacorresponding to the URL, the number of requests in the queue of blockedrequests in the server.

Step 202 is performing analyses and statistical analyses on the numberof requests collected to obtain the blocking status of the applicationrequests.

In this step, numerical analyses and statistical analyses on the numberof requests collected can be performed to determine the number ofrequests in the queue of blocked requests corresponding to eachparticular application, the number of requests in the queue of blockedrequests corresponding to each particular instance, and the number ofrequests in the queue of blocked requests corresponding to a particularhost. For a request, the particular application to which it correspondscan be determined according to the domain name it accesses, theparticular host to which it corresponds can be determined according tothe IP address it accesses, and the particular instance to which itcorresponds can be determined according to the port it accesses.

The number of requests in the queue of blocked requests in combinationwith the processing capacity of the corresponding computing resourcescan reflect the blocking status of the requests, which will be apparentin the description herein below.

Step 203 is scheduling the computing resources of the server for theapplication according to a predetermined scheduling rule and theblocking status of the application requests.

For a particular application, if the blocking status of the requestswith respect to the application satisfies a first expansion condition,for example, the number of requests in the queue of blocked requestsexceeds 3 times the processing capacity of the computing resourcesutilized by the application (here “3 times” is merely exemplary, and inpractice, an empirical value or a value derived from historical data maybe used; the same applies to the examples provided below), then it isindicated that the blocking of the requests with respect to theapplication is critical, and new instances need to be generated anddeployed for the application. The deployment of the new instances may bebased on a load balancing strategy, with the new instances beingpreferentially deployed on hosts having a relatively lower load (forexample, having a relatively smaller number of requests in the queue ofblocked requests). If the blocking status of the requests with respectto the application satisfies a first contraction condition, for example,the number of requests in the queue of blocked requests is less than 0.5times the processing capacity of the computing resources utilized by theapplication, then it is indicated that the number of requests withrespect to the application is small, and the computing resources itoccupies are idle. Thus, instances assigned to the application can bereduced. In particular, no requests can be assigned to an instance to beterminated, and the instance can be terminated when it has no tasks.

For a particular instance, if the blocking status of the requests withrespect to the instance satisfies a second expansion condition, forexample, the number of requests with respect to the instance in thequeue of blocked requests exceeds 3 times the processing capacity of thecomputing resources utilized by the instance, then it is indicated thatthe blocking of the requests with respect to the instance is critical,and system resources can be increased for the instance. System resourcesassociated with the present disclosure may include, but are not limitedto, a CPU, a memory, an IO resource, a network flow, and the like. Insome embodiments, instances can be added to share the load of theinstance. Further, in some embodiments, based on the utilization of thesystem resources by the instance, it can be determined which type ofsystem resources should be added.

If the blocking status of the requests with respect to the instancesatisfies a second contraction condition, for example, the number ofrequests with respect to the instance in the queue of blocked requestsis less than a fractional amount, for example 0.50 or less of theprocessing capacity of the computing resources utilized by the instance,then it is indicated that the computing resources it occupies are idle,and thus the computing resources for the instance can be reduced.

For a particular host, if the blocking status of the requests withrespect to the particular host satisfies a third expansion condition,for example, the number of the requests with respect to the host in thequeue of blocked requests exceeds 3 times the processing capacity of thehost, then additional hosts may be used to share the load of the host.If the blocking status of the requests with respect to the particularhost satisfies a third contraction condition, for example, the number ofrequests with respect to the host in the queue of blocked requests isless than 0.5 times the processing capacity of the host, then newinstances may preferentially be deployed on the host, or, the host maypreferentially be used to share the load with other hosts.

The above-described scheduling of computing resources can be performedperiodically to satisfy the needs for flexible scheduling forapplications in different stages.

On this basis, currently used flexible scheduling mechanisms can also beincorporated, which may, for example, include, but are not limited to,the following.

In some embodiments, resource utilization by the instances in aparticular application is monitored, including such system resources asa CPU, a memory, or an IO resource. If the average resource utilizationby all instances is greater than or equal to a predetermined first upperlimit value, for example, greater than or equal to 80% of thetheoretical average value, then instances can be increased for theparticular application. If the average resource utilization by allinstances is less than or equal to a predetermined first lower limitvalue, for example, less than or equal to 20% of the theoretical averagevalue, then instances can be reduced for the particular application.Here, the first upper limit value is greater than the first lower limitvalue.

In some embodiments, if the resource utilization by an instance isgreater than or equal to a predetermined second upper limit value, forexample, the CPU occupied is greater than 30%, then the systemresources, such as a CPU, a memory, or an IO resource utilized by theinstance can be increased. If the resource utilization by an instance isless than or equal to a predetermined second lower limit value, forexample, the CPU occupied is less than 10%, then the system resourcesutilized by the instance can be decreased. Here, the second upper limitvalue is greater than the second lower limit value.

If a host is detected as unavailable, then a migration, for example, toanother host or a plurality of other hosts, of all of the instances onthe host can be initiated. When migrated to another host or a pluralityof other hosts, the instances can, according to a load balancingstrategy, be migrated to the host(s) with a relatively smaller load.

If a process is detected as unavailable, then a restart of the processcan be performed. If the restart is unsuccessful, then a migration ofthe instances on the process can be initiated. The instances may bemigrated to other processes, in particular, may be migrated to otherprocesses on the same host, but in most circumstances they will bemigrated to processes on other hosts.

If an application is detected as unavailable, which may be caused byfailure of or attack on an application, then the process on which theinstances of the application reside may be restarted, or the instancesof the entire application may be migrated, or an alert may be generated.

In the embodiments described above, the resource utilization by eachinstance of an application can be restricted. By way of non-limitingexample, an upper limit of memory utilization by each instance may beset at 4 GB. The resource utilization by each application may also berestricted. For example, an upper limit of total CPU utilization by allinstances of the application may be set at 80%. The purpose of doingthis is to prevent an unlimited use of system resources caused by someapplication code exceptions. Furthermore, the scheduling system canprovide an interface, which can be used by a user to configure andadjust the above-described scheduling rule and the upper limits ofresource utilization.

FIG. 4 is a block diagram of a system for resource scheduling accordingto some embodiments of the present disclosure. As shown in FIG. 4, thesystem may include a block monitoring unit 00 and a scheduling unit 10,and may further include an event monitoring and statistics module 20provided in a proxy server, and a status detecting unit 30. Here, theblock monitoring unit 00 may include a monitoring subunit 01 and acalculating subunit 02. The scheduling unit 10 may include a schedulingsubunit 11 and a managing subunit 12.

The block monitoring unit 00 is responsible for monitoring the blockingstatus of application requests to be processed by the server.

In particular, the monitoring subunit 01 is responsible for collectingthe number of requests in the queue of blocked requests in the server,the queue of blocked requests including the application requests to beprocessed by the server. The monitoring subunit 01 can collect thenumber of requests in the queue of blocked requests in the server froman exposed API of the proxy server.

Since the proxy server follows an asynchronous event processingmechanism, a corresponding event will be present when processing isperformed. Therefore, an event monitoring and statistics module 20 maybe provided in the proxy server, which is responsible for monitoring tothe events of the proxy server submitting requests to the server inorder to acquire the number of the requests that have been submitted,monitoring to the events of the proxy server confirming that the serverhas completed processing requests in order to acquire the number ofprocessed requests, and determining the number of requests in the queueof blocked requests in the server based on the number of the submittedrequests and the number of the processed requests.

Here, a global variable may be used for statistics of the number of therequests that have been submitted, with the value of 1 being added tothe global variable for each request having been submitted, and thevalue of 1 being subtracted from the global variable for each responsereceived that a request has been processed. The final value of theglobal variable can be considered as the number of requests in the queueof blocked requests in the server, i.e., the number of requests thathave been sent to the server to be processed by the server.

In addition, the event monitoring and statistics module 20 can alsomonitor to the events that the proxy server establishes networkconnections for, in order to acquire the number of requests for whichnetwork connections have been established, but which have not yet beenforwarded to the server. This number of requests indicates theprocessing load that the server will face, and can serve as an assistingfactor which the scheduling unit may use as a reference in subsequentscheduling of computing resources.

The number of requests acquired as above can be output by the eventmonitoring and statistics module 20 through the exposed API of the proxyserver, wherein a communication protocol such as the HTTP protocol, forexample, can be employed for the output. For example, the API mayprovide a particular URL, and when the scheduling system accesses theURL, the API will return a page which can provide the number of requestsdescribed above in the form of a formatted data. That is, the monitoringsubunit 01 accesses the URL provided by the API, to acquire, from thepage data corresponding to the URL, the number of requests in the queueof blocked requests in the server.

The computing subunit 02 is responsible for performing analyses andstatistical analyses on the number of requests collected by themonitoring subunit 01 to obtain the blocking status of the applicationrequests. Here, the blocking status of application requests includes atleast one of following: a blocking status of requests with respect to aparticular application, a blocking status of requests with respect to aparticular instance, and a blocking status of requests with respect to aparticular host. For a request, a particular application to which itcorresponds can be determined according to the domain name it accesses,a particular host to which it corresponds can be determined according tothe IP address it accesses, and a particular instance to which itcorresponds can be determined according to the port it accesses.

Since collection of the number of requests by the monitoring subunit 01is performed periodically, the monitoring subunit 01 can send the datacollected to a monitoring database, and the computing subunit 02performs the above-described analyses and statistical analyses on thedata in the monitoring database.

The scheduling unit 10 is responsible for scheduling the computingresources of the server for the application according to a predeterminedscheduling rule and the blocking status of the application requests.

In particular, the scheduling unit 10 may perform at least one of thefollowing schedulings.

If the blocking status of requests with respect to a particularapplication satisfies a first expansion condition, then new instancesfor the particular application can be generated and deployed. Thedeployment of the new instances can be based on a load balancingstrategy, with the new instances being preferentially deployed on hostshaving a relatively lower load (for example, having a relatively smallernumber of requests in the queue of blocked requests). If the blockingstatus of requests with respect to the particular application satisfiesa first contraction condition, then instances can be reduced for theparticular application, wherein no requests can be assigned to aninstance to be terminated, and the instance can be terminated when ithas no tasks.

If the blocking status of requests with respect to a particular instancesatisfies a second expansion condition, then system resources can beincreased for the particular instance, or other instances can be used toshare the load of the particular instance. If the blocking status ofrequests with respect to the particular instance satisfies a secondcontraction condition, then system resources can be reduced for theparticular instance.

If the blocking status of requests with respect to a particular hostsatisfies a third expansion condition, then other hosts can be used toshare the load of the particular host. If the blocking status ofrequests with respect to the particular host satisfies a thirdcontraction condition, then instances can preferentially be deployed onthe particular host, or the particular host can preferentially be usedto share the load of other hosts.

On this basis, currently used flexible scheduling mechanisms can also beincorporated into the system. In such case, the block monitoring unit 00is also responsible for monitoring the resource utilization by theinstances for a particular application. If the average resourceutilization by the instances for a particular application is greaterthan or equal to a predetermined first upper limit value, then thescheduling unit 10 can increase instances for the particularapplication. If the average resource utilization by the instances for aparticular application is less than or equal to a predetermined firstlower limit value, then the scheduling unit 10 can decrease instancesfor the particular application. Here, the first upper limit value isgreater than the first lower limit value.

If the resource utilization by an instance is greater than or equal to apredetermined second upper limit value, then the scheduling unit 10 canincrease the system resources utilized by the instance, such as a CPU, amemory, or an IO resource. If the resource utilization by an instance isless than or equal to a predetermined second lower limit value, then thescheduling unit 10 can decrease the system resources utilized by theinstance. Here, the second upper limit value is greater than the secondlower limit value.

The status detecting unit 30 is responsible for detecting an operatingstatus of a host, a process or an application. If a host is detected bythe status detecting unit 30 as unavailable, then a migration, forexample, to another host or a plurality of other hosts, of the instanceson the host can be initiated by the scheduling unit 10. In someembodiments, when migrated to another host or a plurality of otherhosts, the instances can, according to a load balancing strategy,preferentially be migrated to the host(s) with a relatively smallerload.

If a process is detected by the status detecting unit 30 as unavailable,then a restart of the process can be performed by the scheduling unit10. If the restart is unsuccessful, then a migration of the instances onthe process can be initiated. The instances can be migrated to otherprocesses, in particular, they can be migrated to other processes on thesame host, but in some embodiments it is preferred that they aremigrated to processes on other hosts.

If the status detecting unit 30 detects an application exception, thenthe scheduling unit 10 can restart the application, or initiate amigration of the instances for the application, or generate an alert.

The scheduling subunit 11 included in the scheduling unit 10 isresponsible for generating a scheduling command based on a predeterminedscheduling rule and the blocking status of the application requests, andsending the scheduling command to the managing subunit 12. In someembodiments, the scheduling subunit 11 can load the scheduling rule froma rules database. The database can be provided with an interface throughwhich a user can configure or change the scheduling rule.

The managing subunit 12 is the unit specifically for performingscheduling operations. The managing subunit 12 is normally responsiblefor management of resources, and in the embodiments of the presentdisclosure, it is responsible for scheduling the computing resources inthe server for applications according to scheduling commands. Further,the result of scheduling can be returned to the scheduling subunit 11.

For the purposes of this disclosure a module and unit is a software,hardware, or firmware (or combinations thereof) system, process orfunctionality, or component thereof, that performs or facilitates theprocesses, features, and/or functions described herein (with or withouthuman interaction or augmentation). A module can include sub-modules,and a unit can comprise a sub-unit. Software components of a module/unitcan be stored on a computer readable medium for execution by aprocessor. Modules/units can be integral to one or more servers ordevices, or be loaded and executed by one or more servers/devices. Oneor more modules can be grouped into an engine or an application.

It should be understood that the system and method disclosed in theembodiments provided by the present disclosure may be implemented inother ways. As such, the embodiments described above are merelyexemplary. For example, the partitioning of the units is merely in alogical and functional sense, and other ways of partitioning may bepossible in practical implementation.

The units that are described as individual components may or may not bephysically separated, and the components shown as units may or may notbe physical units, that is, they may be located in one place, ordistributed on multiple network units. Depending on actual needs, partor all of the units may be selected for achieving the objectives of theembodiments.

Additionally, the individual functional units in each embodiment of thepresent disclosure may be integrated into one processing unit, or mayexist in a physically separated manner, or two or more units may beintegrated into one unit. The integrated unit described above may beimplemented in the form of hardware, or in the form of hardware incombination with software functional units.

The integrated unit implemented in the form of software functional unitscan be stored in a computer readable storage medium. The softwarefunctional units are stored in a storage medium, and comprise a numberof commands enabling a computing device (which may be a personalcomputer, a server, or a network device, or the like) or a processor toperform part of the steps of the method described in each embodiment ofthe present disclosure. The storage medium mentioned above includestangible media such as for example: a USB flash disk, a mobile harddisk, a read-only memory (ROM), a random access memory (RAM), a magneticdisk, or a compact disk, or various other mediums which can storeprogram codes in tangible form as opposed to pure signals.

The embodiments described above are merely preferred embodiments of thepresent disclosure, and are not intended to limit the same. Anymodifications, equivalent substitutions and improvements to theseembodiments without departing from the spirit and principle of thepresent disclosure are deemed to be encompassed within the scope of thepresent disclosure.

The invention claimed is:
 1. A method for resource scheduling, themethod comprising: monitoring at a proxy server, by a scheduling system,a request queue of application requests on an application systemutilizing the proxy server, the application system including one or morehosts and running one or more applications to be processed by theapplication system, each of the one or more applications having one ormore instances; determining, by the scheduling system, a status of therequest queue, the status of the request queue including one or moreblocked requests issued by the proxy server to the one or more hosts;and scheduling, by the scheduling system, computing resources of theapplication system for an application of the one or more applicationsaccording to a predetermined scheduling rule and the status of therequest queue.
 2. The method according to claim 1, the monitoring therequest queue comprising: determining, from the request queue, a numberof application requests; and performing a statistical analysis, based onthe number of application requests, to obtain the status of the requestqueue.
 3. The method according to claim 2, wherein the number of theapplication requests comprises at least one of requests chosen from agroup of requests consisting of a number of the application requestscorresponding to each application of the one or more applications, anumber of the application requests corresponding to each instance of theone or more instances of each of the one or more applications running onthe one or more hosts, and a number of the application requestscorresponding to each host of the one or more hosts.
 4. The methodaccording to claim 2, the determining the number of the applicationrequests comprising: determining the number of the application requestsin the request queue via an exposed Application Programming Interface(API) of the proxy server.
 5. The method according to claim 4, wherein anumber of submitted requests and a number of processed requests isreceived from the proxy server via the API, and wherein the determiningthe number of the application requests in the request queue isdetermining a difference between the number of the submitted requestsand the number of the processed requests.
 6. The method according toclaim 4, the determining the number of the application requestscomprising: accessing a Uniform Resource Locator (URL) provided by theAPI; and acquiring, from page data corresponding to the URL, the numberof the application requests in the request queue.
 7. The methodaccording to claim 3, the scheduling the computing resources of theapplication system for the application comprising at least one of:generating new instances, for each application of the one or moreapplications, when a status of the request queue corresponding to theapplication satisfies a first expansion condition, and reducinginstances, for each application of the one or more applications, whenthe status of the request queue corresponding to the applicationsatisfies a first contraction condition; increasing the computingresources, for each instance of the one or more instances of each of theone or more applications, when a status of the request queuecorresponding to the instance satisfies a second expansion condition,and reducing the computing resources, for each instance of the one ormore instances of each of the one or more applications, when the statusof the request queue corresponding to the respective instance satisfiesa second contraction condition; and using, for each host of the one ormore hosts, other hosts of the one or more hosts to share a load of thehost when a status of the request queue corresponding to the hostsatisfies a third expansion condition, and using, for each host of theone or more hosts, the host to share a load of other hosts of the one ormore hosts when the status of the request queue corresponding to thehost satisfies a third contraction condition, wherein an expansioncondition is a predetermined condition indicating a high utilization ofthe computing resources of the application system, and wherein acontraction condition is a predetermined condition indicating a lowutilization of the computing resources of the application system.
 8. Themethod according to claim 2, the scheduling the computing resources ofthe application system for the application comprising at least one of:increasing, for each application of the one or more applications, anumber of instances of the application when an average resourceutilization of all instances of the one or more instances of theapplication is greater than or equal to a predetermined first upperlimit, and decreasing the number of instances of the application whenthe average resource utilization is less than or equal to apredetermined first lower limit; and increasing, for each instance ofthe one or more instances of each of the one or more applications,computing resources of the instance when a maximum resource utilizationof the instance is greater than or equal to a predetermined second upperlimit, and decreasing, for each instance of the one or more instances ofeach of the one or more applications, the computing resources of theinstance when the maximum resource utilization of the instance is lessthan or equal to a predetermined second lower limit.
 9. A schedulingsystem for resource scheduling, the apparatus comprising: one or moreprocessors; and a non-transitory computer-readable memory storinginstructions executable by the one or more processors, the instructionscausing the scheduling system to: monitor, at a proxy server, a requestqueue of application requests on an application system utilizing theproxy server, the application system including one or more hosts andrunning one or more applications to be processed by the applicationsystem, each of the one or more applications having one or moreinstances; determining, by the scheduling system, a status of therequest queue, the status of the request queue including one or moreblocked requests issued by the proxy server to the one or more hosts;and schedule computing resources of the application system for anapplication of the one or more applications according to a predeterminedscheduling rule and the status of the request queue.
 10. The apparatusaccording to claim 9, wherein the instruction to monitor further causesthe scheduling system to: determine, from the request queue, a number ofapplication requests; and perform a statistical analysis, based on thenumber of application requests, to obtain the status of the requestqueue.
 11. The apparatus according to claim 10, wherein the number ofthe application requests comprises at least one of a number of theapplication requests corresponding to each application of the one ormore applications, a number of the application requests corresponding toeach instance of the one or more instances of each of the one or moreapplications running on the one or more hosts, and a number of theapplication requests corresponding to each host of the one or morehosts.
 12. The apparatus according to claim 10, wherein the instructionto monitor further causes the scheduling system to determine the numberof the application requests in the request queue via an exposedApplication Programming Interface (API) of the proxy server.
 13. Theapparatus according to claim 12, wherein a number of submitted requestsand a number of processed requests is received from the proxy server viathe API, and wherein the number of the application requests in therequest queue is determined as a difference between the number of thesubmitted requests and the number of the processed requests.
 14. Theapparatus according to claim 12, wherein the instruction to monitorfurther causes the scheduling system to: access a Uniform ResourceLocator (URL) provided by the API; and acquire, from page datacorresponding to the URL, the number of the application requests in therequest queue.
 15. The system according to claim 11, wherein thescheduling circuitry is further configured to at least one of: generatenew instances, for each application of the one or more applications,when a status of the request queue corresponding to the applicationsatisfies a first expansion condition, and reduce instances, for eachapplication of the one or more applications, when the status of therequest queue corresponding to the application satisfies a firstcontraction condition; increase the computing resources, for eachinstance of the one or more instances of each of the one or moreapplications, when a status of the request queue corresponding to theinstance satisfies a second expansion condition, and reduce thecomputing resources, for each instance of the one or more instances ofeach of the one or more applications, when the status of the requestqueue corresponding to the respective instance satisfies a secondcontraction condition; and use, for each host of the one or more hosts,other hosts of the one or more hosts to share a load of the host when astatus of the request queue corresponding to the host satisfies a thirdexpansion condition, and use, for each host of the one or more hosts,the host to share a load of other hosts of the one or more hosts whenthe status of the request queue corresponding to the host satisfies athird contraction condition, wherein an expansion condition is apredetermined condition indicating a high utilization of the computingresources of the application system, and wherein a contraction conditionis a predetermined condition indicating a low utilization of thecomputing resources of the application system.
 16. The system accordingto claim 11, wherein the scheduling circuitry is further configured toat least one of: increase, for each application of the one or moreapplications, a number of instances of the application when an averageresource utilization of all instances of the one or more instances ofthe application is greater than or equal to a predetermined first upperlimit, and decrease the number of instances of the application when theaverage resource utilization is less than or equal to a predeterminedfirst lower limit; and increase, for each instance of the one or moreinstances of each of the one or more applications, computing resourcesof the instance when a maximum resource utilization of the instance isgreater than or equal to a predetermined second upper limit, anddecrease, for each instance of the one or more instances of each of theone or more applications, the computing resources of the instance whenthe maximum resource utilization of the instance is less than or equalto a predetermined second lower limit.
 17. A non-transitorycomputer-readable storage medium tangibly encoded withcomputer-executable instructions, that when executed by a processor,cause the processor to perform a method for resource scheduling, themethod comprising: determining, from a request queue of applicationrequests at a proxy server to be processed by an application system forone or more applications, a number of application requests; performing astatistical analysis, based on the number of application requests, toobtain a status of the request queue; determining, by the schedulingsystem, a status of the request queue, the status of the request queueincluding one or more blocked requests issued by the proxy server to theone or more hosts; and scheduling computing resources of the applicationsystem for an application of the one or more applications according to apredetermined scheduling rule and the status of the request queue. 18.The non-transitory computer-readable storage medium according to claim17, wherein the number of the application requests comprises at leastone of a number of the application requests corresponding to eachapplication of the one or more applications, a number of the applicationrequests corresponding to each instance of the one or more instances ofeach of the one or more applications running on the one or more hosts,and a number of the application requests corresponding to each host ofthe one or more hosts.
 19. The non-transitory computer-readable storagemedium according to claim 18, the scheduling the computing resources ofthe application system for the application comprising at least one of:generating new instances, for each application of the one or moreapplications, when a status of the request queue corresponding to theapplication satisfies a first expansion condition, and reducinginstances, for each application of the one or more applications, whenthe status of the request queue corresponding to the applicationsatisfies a first contraction condition; increasing the computingresources, for each instance of the one or more instances of each of theone or more applications, when a status of the request queuecorresponding to the instance satisfies a second expansion condition,and reducing the computing resources, for each instance of the one ormore instances of each of the one or more applications, when the statusof the request queue corresponding to the respective instance satisfiesa second contraction condition; and using, for each host of the one ormore hosts, other hosts of the one or more hosts to share a load of thehost when a status of the request queue corresponding to the hostsatisfies a third expansion condition, and using, for each host of theone or more hosts, the host to share a load of other hosts of the one ormore hosts when the status of the request queue corresponding to thehost satisfies a third contraction condition, wherein an expansioncondition is a predetermined condition indicating a high utilization ofthe computing resources of the application system, and wherein acontraction condition is a predetermined condition indicating a lowutilization of the computing resources of the application system. 20.The non-transitory computer-readable storage medium according to claim18, the scheduling the computing resources of the application system forthe application comprising at least one of: increasing, for eachapplication of the one or more applications, a number of instances ofthe application when an average resource utilization of all instances ofthe one or more instances of the application is greater than or equal toa predetermined first upper limit, and decreasing the number ofinstances of the application when the average resource utilization isless than or equal to a predetermined first lower limit; and increasing,for each instance of the one or more instances of each of the one ormore applications, computing resources of the instance when a maximumresource utilization of the instance is greater than or equal to apredetermined second upper limit, and decreasing, for each instance ofthe one or more instances of each of the one or more applications, thecomputing resources of the instance when the maximum resourceutilization of the instance is less than or equal to a predeterminedsecond lower limit.